<?php



class PostMapBuilder implements MapBuilder {

	
	const CLASS_NAME = 'lib.model.map.PostMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap(PostPeer::DATABASE_NAME);

		$tMap = $this->dbMap->addTable(PostPeer::TABLE_NAME);
		$tMap->setPhpName('Post');
		$tMap->setClassname('Post');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'INTEGER', true, null);

		$tMap->addForeignKey('USER_ID', 'UserId', 'INTEGER', 'user', 'ID', true, null);

		$tMap->addColumn('HANDLE', 'Handle', 'VARCHAR', true, 100);

		$tMap->addColumn('FILE', 'File', 'VARCHAR', false, 100);

		$tMap->addColumn('DATETIME', 'Datetime', 'TIMESTAMP', false, null);

		$tMap->addColumn('PUBLISHED', 'Published', 'INTEGER', true, null);

		$tMap->addColumn('COMMENT_ALLOW', 'CommentAllow', 'INTEGER', true, null);

	} 
} 